<template>
    <div class="shte">
        <div>
            <div v-for="(v,i) in list">
                <div @click="go(v)" style="background-color: #ffffff;margin: 10px;
    padding: 15px 10px;
    border-radius: 7px;
    font-size: 16px;box-sizing: border-box;">
                    <div style="display: flex;justify-content: space-between;">
                        <span>{{v.shop_cat_name}}</span>
                        <van-icon name="arrow" style="vertical-align: middle"/>
                    </div>
                    <div v-for="(c,i) in v.children" style="
    background-color: #f4f4f5;
    margin: 2px 0px;
    margin-top: 10px;
    border-radius: 4px;
    padding: 8px;
    font-size: 16px;">
                        {{c.shop_cat_name}}
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    import jsp from '../../../Api/Api'
    // import uuidv1 from "uuid/v1"
    export default {
        name: "Shopstype",
        data() {
            return {
                show: false,
                list: [],
            }
        },
        created() {
            // console.log(uuidv1());
            // let c =localStorage.getItem('accessToken')
            // console.log(c)
            // jsp.ce4e(c).then(data => {
            //     console.log(data.data)
            // }).catch(error => console.log(error))


            let a = this.$route.query.shop_id
            jsp.shopType(a).then(data => {
                console.log(data.data)
                this.list = data.data
            }).catch(error => console.log(error))
        },
        methods: {
            go(v) {
                console.log(v)
                this.$router.push({path:'/schgs'})
            }
        },
    }
</script>

<style scoped>

</style>